home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Original Shareware 1.1
/
The Original Shareware (WeMake CDs)(Volume 1.1)(CDs, Inc)(1993).iso
/
19
/
madtrb11.zip
/
MONOSPFX.INC
< prev
next >
Wrap
Text File
|
1985-07-13
|
2KB
|
113 lines
{MONOSPFX.INC}
{
This package supports special video effects on the IBM monochrome
display.
Source: "More On Monochrome Special Effects", TUG Lines Volume I Issue 6
Author: Don Taylor and R.L. Wulffson, M.D.
Date: 5/11/85
Last revised: 6/15/85 11:40
Application: IBM PC and true compatibles
}
VAR
AttributeSeg : INTEGER;
AttributeOfs : INTEGER;
{--------------------}
PROCEDURE InitMonoSPFX;
{Find the location of the attribute byte, by changing the video
attribute, then checking for differences}
CONST
MaxOffset = $0900;
VAR
A : INTEGER;
Found : BOOLEAN;
Attribute : BYTE;
{----------}
PROCEDURE FindAttribute;
BEGIN
REPEAT
LowVideo;
Attribute := MEM[AttributeSeg:AttributeOfs];
NormVideo;
IF MEM[AttributeSeg:AttributeOfs] <> Attribute
THEN Found := True
ELSE AttributeOfs := SUCC(AttributeOfs)
UNTIL Found OR (AttributeOfs > MaxOffset)
END; {FindAttribute}
{==========}
BEGIN {InitMonoSPFX}
Found := False;
AttributeSeg := DSeg;
AttributeOfs := 0;
FindAttribute;
IF NOT Found
THEN BEGIN
AttributeSeg := CSeg;
AttributeOfs := 0;
FindAttribute
END
END; {InitMonoSPFX}
{---------------------}
PROCEDURE Reverse;
BEGIN
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] AND $F8;
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] OR $70
END; {Reverse}
{--------------------}
PROCEDURE Blink;
BEGIN
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] OR $80
END; {Blink}
{--------------------}
PROCEDURE UnBlink;
BEGIN
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] AND $7F
END; {UnBlink}
{--------------------}
PROCEDURE UnderLine;
BEGIN
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] AND $88;
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] OR $01
END; {UnderLine}
{--------------------}
PROCEDURE HiInt;
BEGIN
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] OR $08
END; {HiInt}
{--------------------}
PROCEDURE LoInt;
BEGIN
MEM[AttributeSeg:AttributeOfs] := MEM[AttributeSeg:AttributeOfs] AND $F7
END; {LoInt}
{END MONOSPFX.INC}